package com.liurq.springcloud.service;

import org.liurq.springcloud.entites.CommonResult;
import org.liurq.springcloud.entites.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("cloud-payment-service")
public interface PaymentFeignService {

    @PostMapping(value="/payment/create")
    public CommonResult create(@RequestBody Payment payment);

    @GetMapping(value="/payment/get/{id}")
    public CommonResult get(@PathVariable("id")Long id);

    @GetMapping(value = "/payment/feign/timeout")
    public String paymentFeignTimeout();

    @GetMapping(value = "/payment/zipkin")
    public String zipkin();
}
